package com.duoec.dw.lineage.service.analyser;

import com.alibaba.druid.sql.ast.SQLObject;
import com.alibaba.druid.sql.ast.statement.SQLWithSubqueryClause;
import com.duoec.dw.lineage.dto.MultiTableLineageDto;

/**
 * @author xuwenzhen
 */
public interface HiveFromAnalyser<T extends SQLObject> {
    /**
     * 获取当前类处理的类型
     *
     * @return SQLTableSource子类类型
     */
    Class<T> getTableSourceType();

    /**
     * 解析 from
     *
     * @param tableSource         需要解析的from
     * @param withAsTableLineages with-in
     * @return 当前select脚本的血缘关系
     */
    MultiTableLineageDto analyse(T tableSource, MultiTableLineageDto withAsTableLineages);
}
